#include "..\..\include\hgetargetsprite.h"

hgeTargetSprite::hgeTargetSprite(HTARGET targ, float x, float y, float w, float h, bool autoFreeTarget)
: hgeSprite(0, x, y, w, h)
{
	this->target = targ;
	b_freeTarget = autoFreeTarget;
	SetTexture(hge->Target_GetTexture(target));
	SetTextureRect(x, y, w, h);
}

hgeTargetSprite::hgeTargetSprite(const hgeTargetSprite &targSpr)
: hgeSprite(targSpr)
{
	this->b_freeTarget = targSpr.b_freeTarget;
	this->target = targSpr.target;
}

void hgeTargetSprite::RestoreTexture()
{
	SetTexture(hge->Target_GetTexture(target)); 
}